The human interfaces of certain electronic devices or software environments offer an auto-completion function, where the interface attempts to identify a portion of information which might complete that already entered by a user, thereby saving the user the trouble of explicitly entering that remaining portion. This identification process is often carried out by reference to a list of possible complete entries, for example on the basis of past entries, or by reference to a standard library. Such mechanisms are often found for example in the interface of mobile telephones, where the interface is adapted to suggest a complete telephone number on the basis of a partially entered number or name, by reference to a list of contacts and previously dialled numbers. Another example is found in programming environments, where an auto-completion mechanism may suggest a substantial portion of standard code on the basis of the first few characters as entered by the user.
FIG. 1 shows an exemplary flow chart of a prior art approach. According to this approach, a key listener stores within a local variable the timestamp of the last key pressed event. When a new event is fired a new timestamp is taken and if the difference between the two values is less than the given interval the new character is considered as the continuation of the previous one and the new timestamp is updated.
The method begins for example at step 101, according to which the time stamp at the start of data input is recorded. At step 103 it is determined whether a key has been pressed, which step is repeated until a key press event is in fact detected. When such an event is detected, the time stamp of the event is recorded at step 105, and the interval between the last two time stamps determined at step 107. At step 109 it is determined whether the interval calculated at step 107 exceeds a predetermined interval or not, and in a case where is determined that the predetermined interval is not exceeded, the new data symbol is added to a record of the data symbols input so far before looping back to step 103. In a case where is determined that the predetermined interval is exceeded however, the method proceeds to step 113, at which a comparison of the record of keys pressed since step 101 with a collection of possible data inputs is carried out, and at step 115 possible completion values are suggested to the user, which may or may not be accepted. In any case, the fact that the time limit has expired is taken as indicating that the end of the data entry sequence has been reached, so that at step 117 the record of keys pressed since step 101 is emptied before looping back to step 103.
The following pseudo code provides an exemplary partial implementation of this method:
if ( (curTime − ivLastKeyTime) > TimeLimit ){Carry out search for auto-complete textReset the current selection initializing it with the new Key.}else{add new key to current selectionCarry out search for auto-complete text}